import store from '@/store/index'
import homeStore from '@/store/home'

const tabbarStore = homeStore(store)

export function whichPage (toPatn: string) {
    if(toPatn.indexOf('/home') > -1) {
      tabbarStore.active = 0
    }
    if(toPatn.indexOf("/classify") > -1) {
      tabbarStore.active = 1
    }
    if(toPatn.indexOf("/worth_buy") > -1) {
      tabbarStore.active = 2
    }
    if(toPatn.indexOf("/cart") > -1) {
      tabbarStore.active = 3
      
    }
    if(toPatn.indexOf("/user") > -1) {
      tabbarStore.active = 4
    }
}